<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../../build/dist/css/bsui_all.css">
    <title>Document</title>
    <style>        
        .box {margin-top: 50px; text-align: center;}
        .bsui-input-number + .bsui-input-number {margin-left: 20px;}
        h4 {margin: 15px 0 0; font-size: 16px;}
        .sm {width: 150px;}
    </style>
</head>
<body>
    <div class="box">
        <h4>未指定任何值：</h4>
        <label class="bsui-input-number">            
            <input class="bsui-input sm" type="text" id="demoInputNum1">
            <span class="bsui-icon-minus"></span>
            <span class="bsui-icon-plus"></span>            
        </label>
        <h4>使用 data-* 指定值：</h4>
        <label class="bsui-input-number">            
            <input class="bsui-input sm" type="text" value="0.6" data-max="2.0" data-step="0.2" id="demoInputNum2">
            <span class="bsui-icon-minus"></span>
            <span class="bsui-icon-plus"></span>
        </label>
        <h4>使用插件设置项：</h4>
        <label class="bsui-input-number">
            <input class="bsui-input sm" type="text" id="demoInputNum3">     
            <span class="bsui-icon-minus"></span>          
            <span class="bsui-icon-plus"></span>
        </label>
        <h4>不使用控制按钮：</h4>
        <label class="bsui-input-number">            
            <input class="bsui-input sm" type="text" id="demoInputNum4">
        </label>
        <h4>自定义控制按钮顺序：</h4>
        <label class="bsui-input-number">
            <input class="bsui-input sm" type="text" id="demoInputNum8">     
            <span class="bsui-icon-plus"></span>
            <span class="bsui-icon-minus"></span>
        </label>
        <h4>只读模式：</h4>
        <label class="bsui-input-number">            
            <input class="bsui-input sm" type="text" id="demoInputNum5" readonly>
            <span class="bsui-icon-minus"></span>
            <span class="bsui-icon-plus"></span>            
        </label>
        <h4>禁用模式：</h4>
        <label class="bsui-input-number">            
            <input class="bsui-input sm" type="text" value="3" disabled>
            <span class="bsui-icon-minus"></span>
            <span class="bsui-icon-plus"></span>
        </label>
    </div>
    <script src="../../build/dist/js/libs/jquery-1.11.3.min.js"></script>
    <script src="../../build/source/js/form_input_number.js"></script>
    <script>
        $('#demoInputNum1').inputNumber();
        $('#demoInputNum2').inputNumber();
        $('#demoInputNum3').inputNumber({
            value: 6,
            step: 0.1,
            max: 7.0,
            min:5
        });
        $('#demoInputNum4').inputNumber();
        $('#demoInputNum5').inputNumber();
        $('#demoInputNum6').inputNumber();
        $('#demoInputNum7').inputNumber();
        $('#demoInputNum8').inputNumber();

        console.info($(document).calc.plus(0.1, 0.2));
        console.info($(document).calc.minus(0.8, 0.4));
        console.info($(document).calc.times(4, 2));
        console.info($(document).calc.divide(6, 7));
</script>
</body>
</html>